package com.tgy.MyFlowable.workflow.controller;

import com.ctsi.core.common.api.Result;
import com.ctsi.workflow.dto.FlwInstanceTaskDTO;
import com.ctsi.workflow.service.IFlwInstanceTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 实例任务控制器
 *
 * @version 1.0
 * @author: wang xiao xiang
 * @date: 2021/8/8 20:19
 */
@RestController
@RequestMapping("/flow/instance-task")
@RequiredArgsConstructor
@Api(tags = "工作流：流程实例任务")
public class FlwInstanceTaskController {

    private final IFlwInstanceTaskService flwInstanceTaskService;

    @GetMapping("/page")
    @ApiOperation(value = "分页")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "current", required = true, value = "当前页", paramType = "form"),
            @ApiImplicitParam(name = "size", required = true, value = "每页显示数据", paramType = "form"),
            @ApiImplicitParam(name = "keyword", required = true, value = "模糊查询关键词", paramType = "form"),
    })
    public Result<?> page(FlwInstanceTaskDTO flwInstanceTaskDTO) {
        return Result.data(flwInstanceTaskService.page(flwInstanceTaskDTO));
    }
}
